package com.lyz.dataStructure.algorithm.当当2020;/**
 * @Author:759057893@qq.com Lyz
 * @Date: ${Date} 20:05
 * @Description:
 **/

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

/**
 *@Author:759057893@qq.com Lyz
 *@Date: 2019/9/2 20:05
 *@Description:
 **/
public class 字符统计 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str= sc.nextLine();
        char[] chars =str.toCharArray();
        Map<Character,Integer> map = mapFun(chars);
        int max =0;
        for(int i=0;i<str.length();i++){
            if(max<map.get(chars[i])){
                max = map.get(chars[i]);
            }
        }
        System.out.println(max);
    }
  /*  public static int shu(String str){
       String  str1 = str.trim();
       StringBuilder st = new StringBuilder();
       for(int i =0;i<str1.length();i++){
           if(str1.charAt(i)!=' '){
               st.append(str1.charAt(i));
           }
       }
       Map<String,Integer> map = new HashMap<String,Integer>();

    }*/
    public static  Map<Character,Integer> mapFun(char[] chars){
        Map<Character,Integer> map = new HashMap<>();
        if(chars!=null&&chars.length!=0){
            for(int i =0;i<chars.length;i++){
                if(null!=map.get(chars[i])){
                    map.put(chars[i],map.get(chars[i])+1);
                }else {
                    map.put(chars[i],1);
                }
            }
        }
        return map;
    }

}
